
#ifndef __MY_OR_H__
#define __MY_OR_H__
#
# //////////////////////////////////////////////////////////////////////////
# // 2013/01/07
# // xushediao1987@163.com
# //
# // MY_OR(x, y)当x,y至少一个为非零时返回1否则返回0; 0<= (x, y) <256
# // MY_OR(0, 0) ==> 0
# // MY_OR(2, 0) ==> 1
# // MY_OR(2, 3) ==> 1
# //
# // MY_BIT_OR(x, y)当x,y至少一个为1时返回1否则返回0; x, y 只能为0或1 
# // MY_BIT_OR(0, 0) ==> 0
# // MY_BIT_OR(1, 0) ==> 1
# // MY_BIT_OR(1, 1) ==> 1
# //
# //////////////////////////////////////////////////////////////////////////
#
#include "BOOL.h"
#
#define MY_OR(x, y) MY_OR_I(x, y)
#define MY_OR_I(x, y) MY_BIT_OR(MY_BOOL(x), MY_BOOL(y))
#
#
#define MY_BIT_OR(x,y) MY_BIT_OR_I(x,y)
#define MY_BIT_OR_I(x,y) MY_BIT_ ## x ## y
#
#define MY_BIT_00 0
#define MY_BIT_01 1
#define MY_BIT_10 1
#define MY_BIT_11 1
#
#endif
